package com.port.eleport.model.plat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.port.eleport.model.base.IdEntity;

/**
 * 商家
 * 
 * @author jameschen
 */
@Entity
@Table(name = "plat_merchant", schema = "")
@DynamicInsert(true)
@DynamicUpdate(true)
public class TMerchant extends IdEntity  {

	/**
	 * 企业名称
	 */
	@Column(name = "company_name")
	private String companyName;
	/**
	 * 法人或负责人
	 */
	@Column(name = "principal_")
	private String principal;

	/**
	 * 营业执照号
	 */
	@Column(name = "business_license")
	private String businessLicense;

	/**
	 * 身份证号码
	 */
	@Column(name = "id_card")
	private String idCard;

	/**
	 * 经营网址
	 */
	@Column(name = "url_")
	private String url;

	/**
	 * 联系电话
	 */
	@Column(name = "tel_")
	private String tel;

	/**
	 * 经营地址
	 */
	@Column(name = "address_",length=500)
	private String address;

	/**
	 * 邮箱
	 */
	@Column(name = "email_")
	private String email;

	/**
	 * 经营范围
	 */
	@Column(name = "scope_",length=500)
	private String scope;

	/**
	 * 营业执照扫描件
	 */
	@Column(name = "license_img")
	private String licenseImg;

	/**
	 * 法人身份证扫描件
	 */
	@Column(name = "id_card_img")
	private String idCardImg;

	/**
	 * 用户名
	 */
	@Column(name = "userName")
	private String userName;

	/**
	 * 密码
	 */
	@Column(name = "password_")
	private String password;

	@NotNull
	@ManyToOne
	@JoinColumn(name = "type_id")
	private TMerchantType type;

	 
	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getPrincipal() {
		return principal;
	}

	public void setPrincipal(String principal) {
		this.principal = principal;
	}

	public String getBusinessLicense() {
		return businessLicense;
	}

	public void setBusinessLicense(String businessLicense) {
		this.businessLicense = businessLicense;
	}

	public String getIdCard() {
		return idCard;
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getScope() {
		return scope;
	}

	public void setScope(String scope) {
		this.scope = scope;
	}

	public String getLicenseImg() {
		return licenseImg;
	}

	public void setLicenseImg(String licenseImg) {
		this.licenseImg = licenseImg;
	}

	public String getIdCardImg() {
		return idCardImg;
	}

	public void setIdCardImg(String idCardImg) {
		this.idCardImg = idCardImg;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public TMerchantType getType() {
		return type;
	}

	public void setType(TMerchantType type) {
		this.type = type;
	}

}
